/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.pb = (function() {

    /**
     * Namespace pb.
     * @exports pb
     * @namespace
     */
    var pb = {};

    pb.CSLoginGame = (function() {

        /**
         * Properties of a CSLoginGame.
         * @memberof pb
         * @interface ICSLoginGame
         * @property {string|null} [token] CSLoginGame token
         */

        /**
         * Constructs a new CSLoginGame.
         * @memberof pb
         * @classdesc Represents a CSLoginGame.
         * @implements ICSLoginGame
         * @constructor
         * @param {pb.ICSLoginGame=} [properties] Properties to set
         */
        function CSLoginGame(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CSLoginGame token.
         * @member {string} token
         * @memberof pb.CSLoginGame
         * @instance
         */
        CSLoginGame.prototype.token = "";

        /**
         * Creates a new CSLoginGame instance using the specified properties.
         * @function create
         * @memberof pb.CSLoginGame
         * @static
         * @param {pb.ICSLoginGame=} [properties] Properties to set
         * @returns {pb.CSLoginGame} CSLoginGame instance
         */
        CSLoginGame.create = function create(properties) {
            return new CSLoginGame(properties);
        };

        /**
         * Encodes the specified CSLoginGame message. Does not implicitly {@link pb.CSLoginGame.verify|verify} messages.
         * @function encode
         * @memberof pb.CSLoginGame
         * @static
         * @param {pb.ICSLoginGame} message CSLoginGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSLoginGame.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.token != null && Object.hasOwnProperty.call(message, "token"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);
            return writer;
        };

        /**
         * Encodes the specified CSLoginGame message, length delimited. Does not implicitly {@link pb.CSLoginGame.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.CSLoginGame
         * @static
         * @param {pb.ICSLoginGame} message CSLoginGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSLoginGame.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CSLoginGame message from the specified reader or buffer.
         * @function decode
         * @memberof pb.CSLoginGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.CSLoginGame} CSLoginGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSLoginGame.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.CSLoginGame();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.token = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CSLoginGame message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.CSLoginGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.CSLoginGame} CSLoginGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSLoginGame.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CSLoginGame message.
         * @function verify
         * @memberof pb.CSLoginGame
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CSLoginGame.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.token != null && message.hasOwnProperty("token"))
                if (!$util.isString(message.token))
                    return "token: string expected";
            return null;
        };

        /**
         * Creates a CSLoginGame message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.CSLoginGame
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.CSLoginGame} CSLoginGame
         */
        CSLoginGame.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.CSLoginGame)
                return object;
            var message = new $root.pb.CSLoginGame();
            if (object.token != null)
                message.token = String(object.token);
            return message;
        };

        /**
         * Creates a plain object from a CSLoginGame message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.CSLoginGame
         * @static
         * @param {pb.CSLoginGame} message CSLoginGame
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CSLoginGame.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.token = "";
            if (message.token != null && message.hasOwnProperty("token"))
                object.token = message.token;
            return object;
        };

        /**
         * Converts this CSLoginGame to JSON.
         * @function toJSON
         * @memberof pb.CSLoginGame
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CSLoginGame.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CSLoginGame
         * @function getTypeUrl
         * @memberof pb.CSLoginGame
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CSLoginGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.CSLoginGame";
        };

        return CSLoginGame;
    })();

    pb.SCLoginGame = (function() {

        /**
         * Properties of a SCLoginGame.
         * @memberof pb
         * @interface ISCLoginGame
         * @property {pb.ICommon|null} [common] SCLoginGame common
         */

        /**
         * Constructs a new SCLoginGame.
         * @memberof pb
         * @classdesc Represents a SCLoginGame.
         * @implements ISCLoginGame
         * @constructor
         * @param {pb.ISCLoginGame=} [properties] Properties to set
         */
        function SCLoginGame(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SCLoginGame common.
         * @member {pb.ICommon|null|undefined} common
         * @memberof pb.SCLoginGame
         * @instance
         */
        SCLoginGame.prototype.common = null;

        /**
         * Creates a new SCLoginGame instance using the specified properties.
         * @function create
         * @memberof pb.SCLoginGame
         * @static
         * @param {pb.ISCLoginGame=} [properties] Properties to set
         * @returns {pb.SCLoginGame} SCLoginGame instance
         */
        SCLoginGame.create = function create(properties) {
            return new SCLoginGame(properties);
        };

        /**
         * Encodes the specified SCLoginGame message. Does not implicitly {@link pb.SCLoginGame.verify|verify} messages.
         * @function encode
         * @memberof pb.SCLoginGame
         * @static
         * @param {pb.ISCLoginGame} message SCLoginGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCLoginGame.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                $root.pb.Common.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified SCLoginGame message, length delimited. Does not implicitly {@link pb.SCLoginGame.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.SCLoginGame
         * @static
         * @param {pb.ISCLoginGame} message SCLoginGame message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCLoginGame.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SCLoginGame message from the specified reader or buffer.
         * @function decode
         * @memberof pb.SCLoginGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.SCLoginGame} SCLoginGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCLoginGame.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.SCLoginGame();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.common = $root.pb.Common.decode(reader, reader.uint32());
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SCLoginGame message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.SCLoginGame
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.SCLoginGame} SCLoginGame
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCLoginGame.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SCLoginGame message.
         * @function verify
         * @memberof pb.SCLoginGame
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SCLoginGame.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.common != null && message.hasOwnProperty("common")) {
                var error = $root.pb.Common.verify(message.common);
                if (error)
                    return "common." + error;
            }
            return null;
        };

        /**
         * Creates a SCLoginGame message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.SCLoginGame
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.SCLoginGame} SCLoginGame
         */
        SCLoginGame.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.SCLoginGame)
                return object;
            var message = new $root.pb.SCLoginGame();
            if (object.common != null) {
                if (typeof object.common !== "object")
                    throw TypeError(".pb.SCLoginGame.common: object expected");
                message.common = $root.pb.Common.fromObject(object.common);
            }
            return message;
        };

        /**
         * Creates a plain object from a SCLoginGame message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.SCLoginGame
         * @static
         * @param {pb.SCLoginGame} message SCLoginGame
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SCLoginGame.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.common = null;
            if (message.common != null && message.hasOwnProperty("common"))
                object.common = $root.pb.Common.toObject(message.common, options);
            return object;
        };

        /**
         * Converts this SCLoginGame to JSON.
         * @function toJSON
         * @memberof pb.SCLoginGame
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SCLoginGame.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SCLoginGame
         * @function getTypeUrl
         * @memberof pb.SCLoginGame
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SCLoginGame.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.SCLoginGame";
        };

        return SCLoginGame;
    })();

    pb.Common = (function() {

        /**
         * Properties of a Common.
         * @memberof pb
         * @interface ICommon
         * @property {number|null} [code] Common code
         * @property {string|null} [msg] Common msg
         */

        /**
         * Constructs a new Common.
         * @memberof pb
         * @classdesc Represents a Common.
         * @implements ICommon
         * @constructor
         * @param {pb.ICommon=} [properties] Properties to set
         */
        function Common(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Common code.
         * @member {number} code
         * @memberof pb.Common
         * @instance
         */
        Common.prototype.code = 0;

        /**
         * Common msg.
         * @member {string} msg
         * @memberof pb.Common
         * @instance
         */
        Common.prototype.msg = "";

        /**
         * Creates a new Common instance using the specified properties.
         * @function create
         * @memberof pb.Common
         * @static
         * @param {pb.ICommon=} [properties] Properties to set
         * @returns {pb.Common} Common instance
         */
        Common.create = function create(properties) {
            return new Common(properties);
        };

        /**
         * Encodes the specified Common message. Does not implicitly {@link pb.Common.verify|verify} messages.
         * @function encode
         * @memberof pb.Common
         * @static
         * @param {pb.ICommon} message Common message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Common.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.code != null && Object.hasOwnProperty.call(message, "code"))
                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
            if (message.msg != null && Object.hasOwnProperty.call(message, "msg"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.msg);
            return writer;
        };

        /**
         * Encodes the specified Common message, length delimited. Does not implicitly {@link pb.Common.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Common
         * @static
         * @param {pb.ICommon} message Common message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Common.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Common message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Common
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Common} Common
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Common.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Common();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.code = reader.int32();
                        break;
                    }
                case 2: {
                        message.msg = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Common message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Common
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Common} Common
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Common.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Common message.
         * @function verify
         * @memberof pb.Common
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Common.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.code != null && message.hasOwnProperty("code"))
                if (!$util.isInteger(message.code))
                    return "code: integer expected";
            if (message.msg != null && message.hasOwnProperty("msg"))
                if (!$util.isString(message.msg))
                    return "msg: string expected";
            return null;
        };

        /**
         * Creates a Common message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Common
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Common} Common
         */
        Common.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Common)
                return object;
            var message = new $root.pb.Common();
            if (object.code != null)
                message.code = object.code | 0;
            if (object.msg != null)
                message.msg = String(object.msg);
            return message;
        };

        /**
         * Creates a plain object from a Common message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Common
         * @static
         * @param {pb.Common} message Common
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Common.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.code = 0;
                object.msg = "";
            }
            if (message.code != null && message.hasOwnProperty("code"))
                object.code = message.code;
            if (message.msg != null && message.hasOwnProperty("msg"))
                object.msg = message.msg;
            return object;
        };

        /**
         * Converts this Common to JSON.
         * @function toJSON
         * @memberof pb.Common
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Common.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Common
         * @function getTypeUrl
         * @memberof pb.Common
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Common.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.Common";
        };

        return Common;
    })();

    /**
     * MsgId enum.
     * @name pb.MsgId
     * @enum {number}
     * @property {number} Unknow=0 Unknow value
     * @property {number} ReqLogin=1 ReqLogin value
     * @property {number} ResPlayer=10 ResPlayer value
     * @property {number} ReqRolePos=100 ReqRolePos value
     * @property {number} ReqGameRoom=101 ReqGameRoom value
     * @property {number} ReqRole=102 ReqRole value
     * @property {number} ResRole=103 ResRole value
     * @property {number} ResRoleOffline=104 ResRoleOffline value
     * @property {number} ResRolePos=105 ResRolePos value
     */
    pb.MsgId = (function() {
        var valuesById = {}, values = Object.create(valuesById);
        values[valuesById[0] = "Unknow"] = 0;
        values[valuesById[1] = "ReqLogin"] = 1;
        values[valuesById[10] = "ResPlayer"] = 10;
        values[valuesById[100] = "ReqRolePos"] = 100;
        values[valuesById[101] = "ReqGameRoom"] = 101;
        values[valuesById[102] = "ReqRole"] = 102;
        values[valuesById[103] = "ResRole"] = 103;
        values[valuesById[104] = "ResRoleOffline"] = 104;
        values[valuesById[105] = "ResRolePos"] = 105;
        return values;
    })();

    pb.SCPlayer = (function() {

        /**
         * Properties of a SCPlayer.
         * @memberof pb
         * @interface ISCPlayer
         * @property {number|null} [gold] SCPlayer gold
         * @property {string|null} [nick] SCPlayer nick
         */

        /**
         * Constructs a new SCPlayer.
         * @memberof pb
         * @classdesc Represents a SCPlayer.
         * @implements ISCPlayer
         * @constructor
         * @param {pb.ISCPlayer=} [properties] Properties to set
         */
        function SCPlayer(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SCPlayer gold.
         * @member {number} gold
         * @memberof pb.SCPlayer
         * @instance
         */
        SCPlayer.prototype.gold = 0;

        /**
         * SCPlayer nick.
         * @member {string} nick
         * @memberof pb.SCPlayer
         * @instance
         */
        SCPlayer.prototype.nick = "";

        /**
         * Creates a new SCPlayer instance using the specified properties.
         * @function create
         * @memberof pb.SCPlayer
         * @static
         * @param {pb.ISCPlayer=} [properties] Properties to set
         * @returns {pb.SCPlayer} SCPlayer instance
         */
        SCPlayer.create = function create(properties) {
            return new SCPlayer(properties);
        };

        /**
         * Encodes the specified SCPlayer message. Does not implicitly {@link pb.SCPlayer.verify|verify} messages.
         * @function encode
         * @memberof pb.SCPlayer
         * @static
         * @param {pb.ISCPlayer} message SCPlayer message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCPlayer.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.gold != null && Object.hasOwnProperty.call(message, "gold"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.gold);
            if (message.nick != null && Object.hasOwnProperty.call(message, "nick"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nick);
            return writer;
        };

        /**
         * Encodes the specified SCPlayer message, length delimited. Does not implicitly {@link pb.SCPlayer.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.SCPlayer
         * @static
         * @param {pb.ISCPlayer} message SCPlayer message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCPlayer.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SCPlayer message from the specified reader or buffer.
         * @function decode
         * @memberof pb.SCPlayer
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.SCPlayer} SCPlayer
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCPlayer.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.SCPlayer();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.gold = reader.uint32();
                        break;
                    }
                case 2: {
                        message.nick = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SCPlayer message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.SCPlayer
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.SCPlayer} SCPlayer
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCPlayer.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SCPlayer message.
         * @function verify
         * @memberof pb.SCPlayer
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SCPlayer.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.gold != null && message.hasOwnProperty("gold"))
                if (!$util.isInteger(message.gold))
                    return "gold: integer expected";
            if (message.nick != null && message.hasOwnProperty("nick"))
                if (!$util.isString(message.nick))
                    return "nick: string expected";
            return null;
        };

        /**
         * Creates a SCPlayer message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.SCPlayer
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.SCPlayer} SCPlayer
         */
        SCPlayer.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.SCPlayer)
                return object;
            var message = new $root.pb.SCPlayer();
            if (object.gold != null)
                message.gold = object.gold >>> 0;
            if (object.nick != null)
                message.nick = String(object.nick);
            return message;
        };

        /**
         * Creates a plain object from a SCPlayer message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.SCPlayer
         * @static
         * @param {pb.SCPlayer} message SCPlayer
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SCPlayer.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.gold = 0;
                object.nick = "";
            }
            if (message.gold != null && message.hasOwnProperty("gold"))
                object.gold = message.gold;
            if (message.nick != null && message.hasOwnProperty("nick"))
                object.nick = message.nick;
            return object;
        };

        /**
         * Converts this SCPlayer to JSON.
         * @function toJSON
         * @memberof pb.SCPlayer
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SCPlayer.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SCPlayer
         * @function getTypeUrl
         * @memberof pb.SCPlayer
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SCPlayer.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.SCPlayer";
        };

        return SCPlayer;
    })();

    pb.Role = (function() {

        /**
         * Properties of a Role.
         * @memberof pb
         * @interface IRole
         * @property {string|null} [uid] Role uid
         * @property {number|null} [x] Role x
         * @property {number|null} [y] Role y
         * @property {boolean|null} [isStop] Role isStop
         */

        /**
         * Constructs a new Role.
         * @memberof pb
         * @classdesc Represents a Role.
         * @implements IRole
         * @constructor
         * @param {pb.IRole=} [properties] Properties to set
         */
        function Role(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Role uid.
         * @member {string} uid
         * @memberof pb.Role
         * @instance
         */
        Role.prototype.uid = "";

        /**
         * Role x.
         * @member {number} x
         * @memberof pb.Role
         * @instance
         */
        Role.prototype.x = 0;

        /**
         * Role y.
         * @member {number} y
         * @memberof pb.Role
         * @instance
         */
        Role.prototype.y = 0;

        /**
         * Role isStop.
         * @member {boolean} isStop
         * @memberof pb.Role
         * @instance
         */
        Role.prototype.isStop = false;

        /**
         * Creates a new Role instance using the specified properties.
         * @function create
         * @memberof pb.Role
         * @static
         * @param {pb.IRole=} [properties] Properties to set
         * @returns {pb.Role} Role instance
         */
        Role.create = function create(properties) {
            return new Role(properties);
        };

        /**
         * Encodes the specified Role message. Does not implicitly {@link pb.Role.verify|verify} messages.
         * @function encode
         * @memberof pb.Role
         * @static
         * @param {pb.IRole} message Role message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Role.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid);
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 3, wireType 5 =*/29).float(message.y);
            if (message.isStop != null && Object.hasOwnProperty.call(message, "isStop"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isStop);
            return writer;
        };

        /**
         * Encodes the specified Role message, length delimited. Does not implicitly {@link pb.Role.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.Role
         * @static
         * @param {pb.IRole} message Role message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Role.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Role message from the specified reader or buffer.
         * @function decode
         * @memberof pb.Role
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.Role} Role
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Role.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.Role();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.string();
                        break;
                    }
                case 2: {
                        message.x = reader.float();
                        break;
                    }
                case 3: {
                        message.y = reader.float();
                        break;
                    }
                case 4: {
                        message.isStop = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Role message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.Role
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.Role} Role
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Role.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Role message.
         * @function verify
         * @memberof pb.Role
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Role.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isString(message.uid))
                    return "uid: string expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (typeof message.x !== "number")
                    return "x: number expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (typeof message.y !== "number")
                    return "y: number expected";
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                if (typeof message.isStop !== "boolean")
                    return "isStop: boolean expected";
            return null;
        };

        /**
         * Creates a Role message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.Role
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.Role} Role
         */
        Role.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.Role)
                return object;
            var message = new $root.pb.Role();
            if (object.uid != null)
                message.uid = String(object.uid);
            if (object.x != null)
                message.x = Number(object.x);
            if (object.y != null)
                message.y = Number(object.y);
            if (object.isStop != null)
                message.isStop = Boolean(object.isStop);
            return message;
        };

        /**
         * Creates a plain object from a Role message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.Role
         * @static
         * @param {pb.Role} message Role
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Role.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.uid = "";
                object.x = 0;
                object.y = 0;
                object.isStop = false;
            }
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                object.isStop = message.isStop;
            return object;
        };

        /**
         * Converts this Role to JSON.
         * @function toJSON
         * @memberof pb.Role
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Role.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for Role
         * @function getTypeUrl
         * @memberof pb.Role
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.Role";
        };

        return Role;
    })();

    pb.CSRolePos = (function() {

        /**
         * Properties of a CSRolePos.
         * @memberof pb
         * @interface ICSRolePos
         * @property {string|null} [uid] CSRolePos uid
         * @property {number|null} [x] CSRolePos x
         * @property {number|null} [y] CSRolePos y
         * @property {boolean|null} [isStop] CSRolePos isStop
         */

        /**
         * Constructs a new CSRolePos.
         * @memberof pb
         * @classdesc Represents a CSRolePos.
         * @implements ICSRolePos
         * @constructor
         * @param {pb.ICSRolePos=} [properties] Properties to set
         */
        function CSRolePos(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CSRolePos uid.
         * @member {string} uid
         * @memberof pb.CSRolePos
         * @instance
         */
        CSRolePos.prototype.uid = "";

        /**
         * CSRolePos x.
         * @member {number} x
         * @memberof pb.CSRolePos
         * @instance
         */
        CSRolePos.prototype.x = 0;

        /**
         * CSRolePos y.
         * @member {number} y
         * @memberof pb.CSRolePos
         * @instance
         */
        CSRolePos.prototype.y = 0;

        /**
         * CSRolePos isStop.
         * @member {boolean} isStop
         * @memberof pb.CSRolePos
         * @instance
         */
        CSRolePos.prototype.isStop = false;

        /**
         * Creates a new CSRolePos instance using the specified properties.
         * @function create
         * @memberof pb.CSRolePos
         * @static
         * @param {pb.ICSRolePos=} [properties] Properties to set
         * @returns {pb.CSRolePos} CSRolePos instance
         */
        CSRolePos.create = function create(properties) {
            return new CSRolePos(properties);
        };

        /**
         * Encodes the specified CSRolePos message. Does not implicitly {@link pb.CSRolePos.verify|verify} messages.
         * @function encode
         * @memberof pb.CSRolePos
         * @static
         * @param {pb.ICSRolePos} message CSRolePos message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSRolePos.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid);
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 3, wireType 5 =*/29).float(message.y);
            if (message.isStop != null && Object.hasOwnProperty.call(message, "isStop"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isStop);
            return writer;
        };

        /**
         * Encodes the specified CSRolePos message, length delimited. Does not implicitly {@link pb.CSRolePos.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.CSRolePos
         * @static
         * @param {pb.ICSRolePos} message CSRolePos message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSRolePos.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CSRolePos message from the specified reader or buffer.
         * @function decode
         * @memberof pb.CSRolePos
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.CSRolePos} CSRolePos
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSRolePos.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.CSRolePos();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.string();
                        break;
                    }
                case 2: {
                        message.x = reader.float();
                        break;
                    }
                case 3: {
                        message.y = reader.float();
                        break;
                    }
                case 4: {
                        message.isStop = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CSRolePos message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.CSRolePos
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.CSRolePos} CSRolePos
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSRolePos.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CSRolePos message.
         * @function verify
         * @memberof pb.CSRolePos
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CSRolePos.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isString(message.uid))
                    return "uid: string expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (typeof message.x !== "number")
                    return "x: number expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (typeof message.y !== "number")
                    return "y: number expected";
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                if (typeof message.isStop !== "boolean")
                    return "isStop: boolean expected";
            return null;
        };

        /**
         * Creates a CSRolePos message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.CSRolePos
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.CSRolePos} CSRolePos
         */
        CSRolePos.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.CSRolePos)
                return object;
            var message = new $root.pb.CSRolePos();
            if (object.uid != null)
                message.uid = String(object.uid);
            if (object.x != null)
                message.x = Number(object.x);
            if (object.y != null)
                message.y = Number(object.y);
            if (object.isStop != null)
                message.isStop = Boolean(object.isStop);
            return message;
        };

        /**
         * Creates a plain object from a CSRolePos message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.CSRolePos
         * @static
         * @param {pb.CSRolePos} message CSRolePos
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CSRolePos.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.uid = "";
                object.x = 0;
                object.y = 0;
                object.isStop = false;
            }
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                object.isStop = message.isStop;
            return object;
        };

        /**
         * Converts this CSRolePos to JSON.
         * @function toJSON
         * @memberof pb.CSRolePos
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CSRolePos.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CSRolePos
         * @function getTypeUrl
         * @memberof pb.CSRolePos
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CSRolePos.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.CSRolePos";
        };

        return CSRolePos;
    })();

    pb.CSRole = (function() {

        /**
         * Properties of a CSRole.
         * @memberof pb
         * @interface ICSRole
         * @property {string|null} [uid] CSRole uid
         */

        /**
         * Constructs a new CSRole.
         * @memberof pb
         * @classdesc Represents a CSRole.
         * @implements ICSRole
         * @constructor
         * @param {pb.ICSRole=} [properties] Properties to set
         */
        function CSRole(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CSRole uid.
         * @member {string} uid
         * @memberof pb.CSRole
         * @instance
         */
        CSRole.prototype.uid = "";

        /**
         * Creates a new CSRole instance using the specified properties.
         * @function create
         * @memberof pb.CSRole
         * @static
         * @param {pb.ICSRole=} [properties] Properties to set
         * @returns {pb.CSRole} CSRole instance
         */
        CSRole.create = function create(properties) {
            return new CSRole(properties);
        };

        /**
         * Encodes the specified CSRole message. Does not implicitly {@link pb.CSRole.verify|verify} messages.
         * @function encode
         * @memberof pb.CSRole
         * @static
         * @param {pb.ICSRole} message CSRole message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSRole.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid);
            return writer;
        };

        /**
         * Encodes the specified CSRole message, length delimited. Does not implicitly {@link pb.CSRole.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.CSRole
         * @static
         * @param {pb.ICSRole} message CSRole message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSRole.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CSRole message from the specified reader or buffer.
         * @function decode
         * @memberof pb.CSRole
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.CSRole} CSRole
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSRole.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.CSRole();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.string();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CSRole message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.CSRole
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.CSRole} CSRole
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSRole.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CSRole message.
         * @function verify
         * @memberof pb.CSRole
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CSRole.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isString(message.uid))
                    return "uid: string expected";
            return null;
        };

        /**
         * Creates a CSRole message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.CSRole
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.CSRole} CSRole
         */
        CSRole.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.CSRole)
                return object;
            var message = new $root.pb.CSRole();
            if (object.uid != null)
                message.uid = String(object.uid);
            return message;
        };

        /**
         * Creates a plain object from a CSRole message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.CSRole
         * @static
         * @param {pb.CSRole} message CSRole
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CSRole.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.uid = "";
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            return object;
        };

        /**
         * Converts this CSRole to JSON.
         * @function toJSON
         * @memberof pb.CSRole
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CSRole.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CSRole
         * @function getTypeUrl
         * @memberof pb.CSRole
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CSRole.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.CSRole";
        };

        return CSRole;
    })();

    pb.SCRole = (function() {

        /**
         * Properties of a SCRole.
         * @memberof pb
         * @interface ISCRole
         * @property {string|null} [uid] SCRole uid
         * @property {number|null} [x] SCRole x
         * @property {number|null} [y] SCRole y
         * @property {boolean|null} [isStop] SCRole isStop
         */

        /**
         * Constructs a new SCRole.
         * @memberof pb
         * @classdesc Represents a SCRole.
         * @implements ISCRole
         * @constructor
         * @param {pb.ISCRole=} [properties] Properties to set
         */
        function SCRole(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SCRole uid.
         * @member {string} uid
         * @memberof pb.SCRole
         * @instance
         */
        SCRole.prototype.uid = "";

        /**
         * SCRole x.
         * @member {number} x
         * @memberof pb.SCRole
         * @instance
         */
        SCRole.prototype.x = 0;

        /**
         * SCRole y.
         * @member {number} y
         * @memberof pb.SCRole
         * @instance
         */
        SCRole.prototype.y = 0;

        /**
         * SCRole isStop.
         * @member {boolean} isStop
         * @memberof pb.SCRole
         * @instance
         */
        SCRole.prototype.isStop = false;

        /**
         * Creates a new SCRole instance using the specified properties.
         * @function create
         * @memberof pb.SCRole
         * @static
         * @param {pb.ISCRole=} [properties] Properties to set
         * @returns {pb.SCRole} SCRole instance
         */
        SCRole.create = function create(properties) {
            return new SCRole(properties);
        };

        /**
         * Encodes the specified SCRole message. Does not implicitly {@link pb.SCRole.verify|verify} messages.
         * @function encode
         * @memberof pb.SCRole
         * @static
         * @param {pb.ISCRole} message SCRole message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCRole.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.uid != null && Object.hasOwnProperty.call(message, "uid"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uid);
            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                writer.uint32(/* id 2, wireType 5 =*/21).float(message.x);
            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                writer.uint32(/* id 3, wireType 5 =*/29).float(message.y);
            if (message.isStop != null && Object.hasOwnProperty.call(message, "isStop"))
                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isStop);
            return writer;
        };

        /**
         * Encodes the specified SCRole message, length delimited. Does not implicitly {@link pb.SCRole.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.SCRole
         * @static
         * @param {pb.ISCRole} message SCRole message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCRole.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SCRole message from the specified reader or buffer.
         * @function decode
         * @memberof pb.SCRole
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.SCRole} SCRole
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCRole.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.SCRole();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.uid = reader.string();
                        break;
                    }
                case 2: {
                        message.x = reader.float();
                        break;
                    }
                case 3: {
                        message.y = reader.float();
                        break;
                    }
                case 4: {
                        message.isStop = reader.bool();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SCRole message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.SCRole
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.SCRole} SCRole
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCRole.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SCRole message.
         * @function verify
         * @memberof pb.SCRole
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SCRole.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.uid != null && message.hasOwnProperty("uid"))
                if (!$util.isString(message.uid))
                    return "uid: string expected";
            if (message.x != null && message.hasOwnProperty("x"))
                if (typeof message.x !== "number")
                    return "x: number expected";
            if (message.y != null && message.hasOwnProperty("y"))
                if (typeof message.y !== "number")
                    return "y: number expected";
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                if (typeof message.isStop !== "boolean")
                    return "isStop: boolean expected";
            return null;
        };

        /**
         * Creates a SCRole message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.SCRole
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.SCRole} SCRole
         */
        SCRole.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.SCRole)
                return object;
            var message = new $root.pb.SCRole();
            if (object.uid != null)
                message.uid = String(object.uid);
            if (object.x != null)
                message.x = Number(object.x);
            if (object.y != null)
                message.y = Number(object.y);
            if (object.isStop != null)
                message.isStop = Boolean(object.isStop);
            return message;
        };

        /**
         * Creates a plain object from a SCRole message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.SCRole
         * @static
         * @param {pb.SCRole} message SCRole
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SCRole.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.uid = "";
                object.x = 0;
                object.y = 0;
                object.isStop = false;
            }
            if (message.uid != null && message.hasOwnProperty("uid"))
                object.uid = message.uid;
            if (message.x != null && message.hasOwnProperty("x"))
                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
            if (message.y != null && message.hasOwnProperty("y"))
                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
            if (message.isStop != null && message.hasOwnProperty("isStop"))
                object.isStop = message.isStop;
            return object;
        };

        /**
         * Converts this SCRole to JSON.
         * @function toJSON
         * @memberof pb.SCRole
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SCRole.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SCRole
         * @function getTypeUrl
         * @memberof pb.SCRole
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SCRole.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.SCRole";
        };

        return SCRole;
    })();

    pb.CSGameRoom = (function() {

        /**
         * Properties of a CSGameRoom.
         * @memberof pb
         * @interface ICSGameRoom
         * @property {number|null} [roomId] CSGameRoom roomId
         */

        /**
         * Constructs a new CSGameRoom.
         * @memberof pb
         * @classdesc Represents a CSGameRoom.
         * @implements ICSGameRoom
         * @constructor
         * @param {pb.ICSGameRoom=} [properties] Properties to set
         */
        function CSGameRoom(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * CSGameRoom roomId.
         * @member {number} roomId
         * @memberof pb.CSGameRoom
         * @instance
         */
        CSGameRoom.prototype.roomId = 0;

        /**
         * Creates a new CSGameRoom instance using the specified properties.
         * @function create
         * @memberof pb.CSGameRoom
         * @static
         * @param {pb.ICSGameRoom=} [properties] Properties to set
         * @returns {pb.CSGameRoom} CSGameRoom instance
         */
        CSGameRoom.create = function create(properties) {
            return new CSGameRoom(properties);
        };

        /**
         * Encodes the specified CSGameRoom message. Does not implicitly {@link pb.CSGameRoom.verify|verify} messages.
         * @function encode
         * @memberof pb.CSGameRoom
         * @static
         * @param {pb.ICSGameRoom} message CSGameRoom message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSGameRoom.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.roomId != null && Object.hasOwnProperty.call(message, "roomId"))
                writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.roomId);
            return writer;
        };

        /**
         * Encodes the specified CSGameRoom message, length delimited. Does not implicitly {@link pb.CSGameRoom.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.CSGameRoom
         * @static
         * @param {pb.ICSGameRoom} message CSGameRoom message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        CSGameRoom.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a CSGameRoom message from the specified reader or buffer.
         * @function decode
         * @memberof pb.CSGameRoom
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.CSGameRoom} CSGameRoom
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSGameRoom.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.CSGameRoom();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        message.roomId = reader.uint32();
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a CSGameRoom message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.CSGameRoom
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.CSGameRoom} CSGameRoom
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        CSGameRoom.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a CSGameRoom message.
         * @function verify
         * @memberof pb.CSGameRoom
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        CSGameRoom.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.roomId != null && message.hasOwnProperty("roomId"))
                if (!$util.isInteger(message.roomId))
                    return "roomId: integer expected";
            return null;
        };

        /**
         * Creates a CSGameRoom message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.CSGameRoom
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.CSGameRoom} CSGameRoom
         */
        CSGameRoom.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.CSGameRoom)
                return object;
            var message = new $root.pb.CSGameRoom();
            if (object.roomId != null)
                message.roomId = object.roomId >>> 0;
            return message;
        };

        /**
         * Creates a plain object from a CSGameRoom message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.CSGameRoom
         * @static
         * @param {pb.CSGameRoom} message CSGameRoom
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        CSGameRoom.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.roomId = 0;
            if (message.roomId != null && message.hasOwnProperty("roomId"))
                object.roomId = message.roomId;
            return object;
        };

        /**
         * Converts this CSGameRoom to JSON.
         * @function toJSON
         * @memberof pb.CSGameRoom
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        CSGameRoom.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for CSGameRoom
         * @function getTypeUrl
         * @memberof pb.CSGameRoom
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        CSGameRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.CSGameRoom";
        };

        return CSGameRoom;
    })();

    pb.SCGameRoom = (function() {

        /**
         * Properties of a SCGameRoom.
         * @memberof pb
         * @interface ISCGameRoom
         * @property {Array.<pb.IRole>|null} [role] SCGameRoom role
         */

        /**
         * Constructs a new SCGameRoom.
         * @memberof pb
         * @classdesc Represents a SCGameRoom.
         * @implements ISCGameRoom
         * @constructor
         * @param {pb.ISCGameRoom=} [properties] Properties to set
         */
        function SCGameRoom(properties) {
            this.role = [];
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * SCGameRoom role.
         * @member {Array.<pb.IRole>} role
         * @memberof pb.SCGameRoom
         * @instance
         */
        SCGameRoom.prototype.role = $util.emptyArray;

        /**
         * Creates a new SCGameRoom instance using the specified properties.
         * @function create
         * @memberof pb.SCGameRoom
         * @static
         * @param {pb.ISCGameRoom=} [properties] Properties to set
         * @returns {pb.SCGameRoom} SCGameRoom instance
         */
        SCGameRoom.create = function create(properties) {
            return new SCGameRoom(properties);
        };

        /**
         * Encodes the specified SCGameRoom message. Does not implicitly {@link pb.SCGameRoom.verify|verify} messages.
         * @function encode
         * @memberof pb.SCGameRoom
         * @static
         * @param {pb.ISCGameRoom} message SCGameRoom message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCGameRoom.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.role != null && message.role.length)
                for (var i = 0; i < message.role.length; ++i)
                    $root.pb.Role.encode(message.role[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified SCGameRoom message, length delimited. Does not implicitly {@link pb.SCGameRoom.verify|verify} messages.
         * @function encodeDelimited
         * @memberof pb.SCGameRoom
         * @static
         * @param {pb.ISCGameRoom} message SCGameRoom message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        SCGameRoom.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a SCGameRoom message from the specified reader or buffer.
         * @function decode
         * @memberof pb.SCGameRoom
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {pb.SCGameRoom} SCGameRoom
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCGameRoom.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pb.SCGameRoom();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1: {
                        if (!(message.role && message.role.length))
                            message.role = [];
                        message.role.push($root.pb.Role.decode(reader, reader.uint32()));
                        break;
                    }
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a SCGameRoom message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof pb.SCGameRoom
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {pb.SCGameRoom} SCGameRoom
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        SCGameRoom.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a SCGameRoom message.
         * @function verify
         * @memberof pb.SCGameRoom
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        SCGameRoom.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.role != null && message.hasOwnProperty("role")) {
                if (!Array.isArray(message.role))
                    return "role: array expected";
                for (var i = 0; i < message.role.length; ++i) {
                    var error = $root.pb.Role.verify(message.role[i]);
                    if (error)
                        return "role." + error;
                }
            }
            return null;
        };

        /**
         * Creates a SCGameRoom message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof pb.SCGameRoom
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {pb.SCGameRoom} SCGameRoom
         */
        SCGameRoom.fromObject = function fromObject(object) {
            if (object instanceof $root.pb.SCGameRoom)
                return object;
            var message = new $root.pb.SCGameRoom();
            if (object.role) {
                if (!Array.isArray(object.role))
                    throw TypeError(".pb.SCGameRoom.role: array expected");
                message.role = [];
                for (var i = 0; i < object.role.length; ++i) {
                    if (typeof object.role[i] !== "object")
                        throw TypeError(".pb.SCGameRoom.role: object expected");
                    message.role[i] = $root.pb.Role.fromObject(object.role[i]);
                }
            }
            return message;
        };

        /**
         * Creates a plain object from a SCGameRoom message. Also converts values to other types if specified.
         * @function toObject
         * @memberof pb.SCGameRoom
         * @static
         * @param {pb.SCGameRoom} message SCGameRoom
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        SCGameRoom.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.arrays || options.defaults)
                object.role = [];
            if (message.role && message.role.length) {
                object.role = [];
                for (var j = 0; j < message.role.length; ++j)
                    object.role[j] = $root.pb.Role.toObject(message.role[j], options);
            }
            return object;
        };

        /**
         * Converts this SCGameRoom to JSON.
         * @function toJSON
         * @memberof pb.SCGameRoom
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        SCGameRoom.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        /**
         * Gets the default type url for SCGameRoom
         * @function getTypeUrl
         * @memberof pb.SCGameRoom
         * @static
         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
         * @returns {string} The default type url
         */
        SCGameRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
            if (typeUrlPrefix === undefined) {
                typeUrlPrefix = "type.googleapis.com";
            }
            return typeUrlPrefix + "/pb.SCGameRoom";
        };

        return SCGameRoom;
    })();

    return pb;
})();

module.exports = $root;
